const http = require('http');

let icyServer = new Promise((executor, reject) => {
  let server = http.createServer((req, res) => {
    try {
      executor(req, res, server);
    } catch (err) {
      reject(err);
    }
  });
});

module.exports = {
  icyServer
};